<template>
	<view id="names">
		<view class="ibody">
			<view class="top">
				<view class="banner">
					<image src="@/static/images/hl_banner.png" mode="widthFix" style="width: 1709px;" />
				</view>
				<view class="form">
					<view class="input">
						<label>真实姓名</label>
						<p>{{form.name}}</p>
					</view>
					<view class="input">
						<label>身份证号</label>
						<p>{{form.cardNo}}</p>
					</view>
					<view style="margin-top: 10px;">
						<button @click="auth()" type="primary" shape="round" class="submit">
							去人脸识别验证本人
						</button>
					</view>
				</view>
			</view>
			<view class="shuoming">
				<view class="text-center bq">成都天启数科网络安全技术有限公司 版权所有</view>
				<view class="text-center">
					"容易查"严格按照相关法律法规及监管单位的操作要求，合法合规经营，所有报告数据均由第三方合规公司、机构提供，不获取用户本地隐私数据，若您对查询数据结果有异议，可联系客服发起异议处理。</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		concealKeyword,
		authFace
	} from '@/api/jinjian.js'
	export default {

		data() {
			return {
				orderNo: undefined,
				form: {
					name: '',
					cardNo: ''
				}
			}
		},
		onLoad(options) {
			console.log('---options---', options)
			if (!options.orderNo) {
				this.$tab.reLaunch('/pages/marriage')
				return
			}
			this.orderNo = options.orderNo
			concealKeyword(this.orderNo).then(res => {
				console.log('---this.form---', this.form)
				this.form.name = res.name
				this.form.cardNo = res.cardNo
			})
		},
		methods: {
			auth() {
				authFace(this.orderNo).then(res => {
					console.log('---authFace----', res)
					window.location.href = res.url
				})
			}
		}
	}
</script>

<style scoped>
	#names {
		width: 100%;
		background-color: #F5F5F5;
		position: relative;

		.ibody {
			min-height: 100vh;
			padding-top: 3vh;
			background-color: #5e17eb;

			.top {
				.banner {
					text-align: center;
					padding: 10px 0;
					border-radius: 5px;
					position: relative;
				}

				.form {
					background-color: #fff;
					border-radius: 10px;
					padding: 20px 15px;
					margin: 0 10px;
					position: relative;

					.input {
						font-size: 14px;
						height: 45px;
						line-height: 45px;
						border-bottom: 1px solid #F2F2F2;
						display: flex;
					}

					label {
						width: 35%;
						display: inline-block;
						text-align: center;
						font-weight: 600;
					}

					.submit {
						font-size: 13px;
						padding: 1px 0;
					}
				}
			}

			.shuoming {
				background-color: #5e17eb;
				padding: 15px;
				color: #999;

				.bq {
					color: #fff;
					margin-bottom: 30px;
				}
			}
		}
	}
</style>